package com.cat.common.exception;

import org.springframework.http.HttpStatus;

import static org.springframework.http.HttpStatus.INTERNAL_SERVER_ERROR;

/**
 * @author dd-cat
 * @version 1.0
 * @date 2020-10-12 15:21
 */
public class BaseException extends RuntimeException {

    /**
     * 错误码
     */
    private int status = INTERNAL_SERVER_ERROR.value();

    public BaseException(String message) {
        super(message);
    }

    public BaseException(HttpStatus status, String message) {
        super(message);
        this.status = status.value();
    }
}

